 
package com.xbongbong.sys.domain.dao;

import com.xbongbong.sys.domain.entity.CoverRoleEntity;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;


/**
* @author autoGen
* @time 2019-05-07 20:14:54
*/
public interface CoverRoleDao {

	Integer insert(CoverRoleEntity coverRole);

	Integer update(CoverRoleEntity coverRole);

	Integer deleteByKey(@Param("key") Integer key, @Param("corpid") String corpid);

	CoverRoleEntity getByKey(@Param("key") Integer key, @Param("corpid") String corpid);

	/**
	 * 根据 corpid 和 roleId 获取 CoverRoleEntity
	 * @param roleId 系统角色id
	 * @param corpid 公司id
	 * @return CoverRoleEntity
	 */
	CoverRoleEntity getByRoleId(@Param("roleId") Integer roleId, @Param("corpid") String corpid);
	
	List<CoverRoleEntity>  findEntitys(@Param("param") Map<String, Object> param);

	Integer getEntitysCount(@Param("param") Map<String, Object> param);

	void updateBatchPermissions(@Param("list")List<CoverRoleEntity> CoverRoleEntityList, @Param("corpid")String corpid);

}